package com.cn.bulu.service.impl;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Service;

import com.cn.bulu.dao.AppUpdateDao;
import com.cn.bulu.pojo.AppUpdateInfo;
import com.cn.bulu.service.AppUpdateService;
import com.cn.bulu.utils.BuluResult;

@Service("appUpdateService")
public class AppUpdateServiceImpl implements AppUpdateService{

	@Resource
	private AppUpdateDao appUpdateDao;


	@Override
	public BuluResult getUpdateInfo(HttpServletRequest request) {
		AppUpdateInfo info = appUpdateDao.getUpdateInfo();
		BuluResult buluResult = new BuluResult();
		buluResult.setStatus(0);
		buluResult.setData(info);
		return buluResult;
	}
	
	@Override
	public BuluResult getNewUpdateInfo(HttpServletRequest request,String id) {
		AppUpdateInfo info = appUpdateDao.getNewUpdateInfo(Integer.parseInt(id));
		BuluResult buluResult = new BuluResult();
		buluResult.setStatus(0);
		buluResult.setData(info);
		return buluResult;
	}
}
